/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package it.nesimuge.score.gui.model;

import it.lapomuge.db.entity.Gara;

import javax.swing.AbstractListModel;

/**
 *
 * @author Muge
 */
public class ModelListGare extends AbstractListModel {

    Gara[] gare = new Gara[0];

    public Gara[] getGare() {
        return gare;
    }

    public void setGare(Gara[] gare) {
        this.gare = gare;
        this.fireContentsChanged(this, 0, gare.length);
    }

    public int getSize() {
        return gare.length;
    }

    public Object getElementAt(int index) {
//        CodiceStatoGara stato = (CodiceStatoGara) CodiceCollector.findByCodice(CodiceStatoGara.values(), gare[index].getStato());
        return null; //gare[index].getNome() + " " + stato.getTesto();
    }
}
